package org.jeecg.modules.inspection.service.impl;

import org.jeecg.modules.inspection.entity.InspectionUser;
import org.jeecg.modules.inspection.mapper.InspectionUserMapper;
import org.jeecg.modules.inspection.service.IInspectionUserService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.entity.SysUserPosition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 巡更人
 * @Author: jeecg-boot
 * @Date:   2019-09-20
 * @Version: V1.0
 */
@Service
public class InspectionUserServiceImpl extends ServiceImpl<InspectionUserMapper, InspectionUser> implements IInspectionUserService {

    @Autowired
    private InspectionUserMapper inspectionUserMapper;
    @Override
    public List<SysUser> getUserByOffice(String officeId) {
        return inspectionUserMapper.getUserByOffice(officeId);
    }

    @Override
    public boolean setInsTime(InspectionUser inspectionUser) {
        return inspectionUserMapper.setInsTime(inspectionUser.getId(),inspectionUser.getNextTime());
    }

    @Override
    public List<String> getUserListByLineId(String lineId) {
        return inspectionUserMapper.getUserListByLineId(lineId);
    }
}
